package com.wuseguang.springcloud.controller;


import com.wuseguang.springcloud.Filter.RequestParameterWrapper;
import com.wuseguang.springcloud.service.TemperatureService;
import com.wuseguang.springcloud.util.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 学生体温表 前端控制器
 * </p>
 *
 * @author 
 * @since 2020-07-06
 */
@RestController
@RequestMapping("/jurisdiction")
public class TemperatureController {

    private Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private TemperatureService temperatureServiceImpl;

    /**
     * 查询学生的体温
     * @param request
     * @param time 要查询的时间
     * @return
     */
    @RequestMapping("/findStudentTemperature")
    public Result findStudentTemperature(RequestParameterWrapper request,
                                         @RequestParam(value = "time", required = false) String time){
        logger.info("查询学生的体温");
        //获取学校id
        String schoolId = request.getParam("schoolId");
        return temperatureServiceImpl.findStudentTemperature(schoolId,time);
    }

}

